package com.example.leetdemo.process;

import com.example.leetdemo.utils.DateUtils;

import java.time.LocalDateTime;
import java.util.Arrays;

public class Solution134 {

    public int canCompleteCircuit(int[] gas, int[] cost) {
        int[][] dp = new int[gas.length][2];
        for (int i = 0; i < gas.length; i++) {
            dp[i][0] = gas[i] - cost[i];
            dp[i][1] += dp[i][0];
        }
        return 0;
    }

    public int lengthOfLastWord(String s) {
        String[] arr = s.split(" ");
        return arr[arr.length - 1].length();
    }

    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();
        now = DateUtils.parse("2024-07-18 17:30:02");
        long overflowSeconds = DateUtils.localDateTimeToMilli(now) / 1000 % 900;
        System.err.println(DateUtils.format(now.minusSeconds(overflowSeconds)));

        System.err.println(DateUtils.format(now.minusSeconds(overflowSeconds)).substring(0, 16));
        String devTime = DateUtils.format(now.minusSeconds(overflowSeconds)).substring(0, 16) + ":00";
        System.err.println(devTime);
    }

}
